/**
 * @Title: ApplicationUtils.java
 * @Package com.eppear.jpfm.framework.application
 * @Description: 应用类工具
 * @author JianFeng Zhang(张建锋)
 * @date 2016-12-14 下午8:03:32
 * @version 
 */
package com.eppear.jpfm.framework.application;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
/**
 * @ClassName ApplicationUtils
 * @Description 应用类工具
 * @author JianFeng Zhang(张建锋)
 * @date 2016-12-14 下午8:03:32
 *
 */
public class ApplicationUtils implements ApplicationContextAware {

	private static ApplicationContext applicationContext;

	@Override
	public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
		ApplicationUtils.applicationContext = applicationContext;
	}

	public static ApplicationContext getApplicationContext() {
		return applicationContext;
	}

	public static Object getBean(String name) {
		return applicationContext.getBean(name);
	}

}
